﻿(function ($) {
	$.fn.pager = function (callback) {
		var container = $(this);
		container.find("a[data-page]").off("click").on("click", function () {
			var page = $(this);
			var type = page.data('type');
			if (type == 'disabled')
				return;
			if (typeof (callback) == 'function')
				callback(parseInt(page.data('page')));
		});
	};
})(jQuery);